import requests


class IhrmLoginApi(object):
    def login(self, login_data):
        resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login", json=login_data)
        return resp


if __name__ == '__main__':
    ihrm_login = IhrmLoginApi()
    login_data = {"mobile": "13800000002", "password": "123456"}
    print(ihrm_login.login(login_data).json())
